<template>
  <div>
    <input 
      type="text"
      v-model="inputValue"
      @keydown.enter="addValue"
    />
    <mt-button type="primary" size="small" @click="addValue">default</mt-button>
    {{inputValue}}
  </div>
</template>

<script>
import Vue from 'Vue'
import { Button } from 'mint-ui';

Vue.component(Button.name, Button);
export default {
  name:'TodoInput',
  data(){
    return {
      inputValue:''
    }
  },
  methods:{
    addValue(){
      this.$emit('addNewValue',this.inputValue)
      this.inputValue = ''
    }
  }
}
</script>

<style>
  
</style>